const state = {
  userInfo: null,
};

const mutations = {
  SET_USER_INFO(state, info) {
    state.userInfo = info;
  },
};

const actions = {
  async fetchUserInfo({ commit }) {
    // 异步获取用户信息并提交Mutation
  },
};

const getters = {
  getUserInfo: state => state.userInfo,
};

export default {
  namespaced: true, // 启用命名空间
  state,
  mutations,
  actions,
  getters,
};